<!DOCTYPE html>
<html>
<head>
    <title>{$category.name} {$category.seo_title} {$site_info.site_name|default=''}</title>
    <meta name="keywords" content="{$category.seo_keywords},{$site_info.site_seo_keywords|default=''}"/>
    <meta name="description" content="{$category.seo_description},{$site_info.site_seo_description|default=''}">
    <include file="public@head"/>
    <hook name="before_head_end"/>
</head>
<body class="body-white">
<include file="public@nav"/>
<include file="public@banner"/>
<div class="center">
    <div class="title">
        <php>$demo_time=2;</php>
        <h1>{$category.name}</h1>
        <p>{$category.description}</p>
    </div>
    <!--主内容开始-->
    <php>
        $where=[
        'post.create_time'=>['egt',0]
        ];
        $page=[
        'list_rows'=>8,
        'next'=>'下一页',
        'prev'=>'上一页'
        ];
    </php>
    <div class="new">


        <!--右侧列表-->
        <div class="right">
            <php>
                $hot_articles=[];
            </php>
            <div class="newTitle">
                热点新闻<span>HOT NEWS</span>
            </div>
            <div class="newTitle newDetal">
                <ul>
                    <portal:articles limit="5" order="post.post_hits DESC">
                        <php>$top=$key<3?"top3":"";</php>
                        <li>
                            <span></span>
                            <a title="{$vo.post_title}"
                               href="{:url('portal/article/index',array('id'=>$vo['id']))}">
                                {$vo.post_title}
                            </a>
                        </li>
                    </portal:articles>
                </ul>
            </div>
            <div class="newTitle mt20">
                联系方式<span>CONTACT</span>
            </div>
            <div class="newTell">
                <div class="contact_item">
                    <p>全国免费咨询电话</p>
                    <div class="contact_tell"><span class="icon icon_small icon_small_1"></span>371-56971285</div>
                </div>
            </div>
        </div>

        <!--end-->
        <!--左侧列表-->
        <div class="left">
            <php>
                $posts_count=0;
            </php>
            <div id="new-list">

            <portal:articles item="vo" where="$where" order="post.published_time DESC" page="$page"
                             relation="categories"
                             categoryIds="$category.id"
                             returnVarName="articles_data">
                <php>
                    $posts_count++;
                </php>
                <div class="newList">
                    <notempty name="vo.more.thumbnail">
                        <img src="{:cmf_get_image_url($vo.more.thumbnail)}"/>
                    </notempty>
                    <div class="newCont">
                        <h3><a href="{:url('portal/article/index',['id'=>$vo['id'],'cid'=>$category.id])}">{$vo.post_title}</a></h3>
                        <p>{$vo.post_excerpt}</p>
                        <div class="other"><span><img src="__TMPL__/public/assets/images/eyes.png"/>{$vo.post_hits}</span><i>{:date('Y/m/d',$vo.published_time)}</i></div>
                    </div>
                </div>
            </portal:articles>
            </div>

            <if condition="$posts_count elt 8" >
                <div class="loading1 loading">加载更多<a href="javascript:void(0);" class="icon load-list"></a></div>
                <div class="loadinging loading" style="display: none">加载中...</div>

            </if>
        </div>
        <!--end-->
    </div>

    <!--主内容结束-->
</div>

<include file="public@contact"/>
<include file="public@footer"/>
<include file="public@scripts"/>
<script src="__TMPL__/public/assets/js/jquery-1.8.3.min.js"></script>
<script>
    p=2
    l=8
    cat_id = {$category.id}

    $(function () {
        $(document).on('click','.load-list',function () {
            $('.loading1').hide();
            $('.loadinging').show();
            _url = '{:url("List/ajaxList")}'
            $.get(_url,{
                p:p++,
                l:l,
                id:cat_id,
                html:1
            },
                function(e){
                    if(e){
                        $('.loadinging').hide();
                        $('.loading1').show();
                        $('#new-list').append(e);
                    }else{
                        $('.loadinging').hide();
                    }

                },
            )
        })
    })
</script>
<hook name="before_body_end"/>
</body>
</html>